package cn.aitrox.ry.service.dwh.controller;

import cn.aitrox.ry.bean.RespResult;
import cn.aitrox.ry.service.dwh.api.DwhSeriesApi;
import cn.aitrox.ry.service.dwh.dto.DwhSeriesDto;
import cn.aitrox.ry.service.dwh.dto.in.DwhSeriesQueryInDto;
import cn.aitrox.ry.service.dwh.service.SeriesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SeriesController implements DwhSeriesApi {

    @Autowired
    private SeriesService seriesService;

    @PostMapping("/dwh/series/query")
    @Override
    public RespResult<List<DwhSeriesDto>> seriesQuery(@RequestBody DwhSeriesQueryInDto input) {
        return seriesService.seriesQuery(input.getSeriesUids());
    }
}
